home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / gutenprint / curve-cache.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-03-15  |  2.5 KB  |  83 lines

  1. /*
  2.  * "$Id: curve-cache.h,v 1.2 2005/10/18 02:08:16 rlk Exp $"
  3.  *
  4.  *   Gimp-Print color management module - traditional Gimp-Print algorithm.
  5.  *
  6.  *   Copyright 1997-2000 Michael Sweet (mike@easysw.com) and
  7.  *    Robert Krawitz (rlk@alum.mit.edu)
  8.  *
  9.  *   This program is free software; you can redistribute it and/or modify it
  10.  *   under the terms of the GNU General Public License as published by the Free
  11.  *   Software Foundation; either version 2 of the License, or (at your option)
  12.  *   any later version.
  13.  *
  14.  *   This program is distributed in the hope that it will be useful, but
  15.  *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  16.  *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  17.  *   for more details.
  18.  *
  19.  *   You should have received a copy of the GNU General Public License
  20.  *   along with this program; if not, write to the Free Software
  21.  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22.  */
  23.  
  24. /**
  25.  * @file gutenprint/curve-cache.h
  26.  * @brief Curve caching functions.
  27.  */
  28.  
  29. /*
  30.  * This file must include only standard C header files.  The core code must
  31.  * compile on generic platforms that don't support glib, gimp, gtk, etc.
  32.  */
  33.  
  34. #ifndef GUTENPRINT_CURVE_CACHE_H
  35. #define GUTENPRINT_CURVE_CACHE_H
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #include <gutenprint/curve.h>
  42.  
  43. typedef struct
  44. {
  45.   stp_curve_t *curve;
  46.   const double *d_cache;
  47.   const unsigned short *s_cache;
  48.   size_t count;
  49. } stp_cached_curve_t;
  50.  
  51. extern void stp_curve_free_curve_cache(stp_cached_curve_t *cache);
  52.  
  53. extern void stp_curve_cache_curve_data(stp_cached_curve_t *cache);
  54.  
  55. extern stp_curve_t *stp_curve_cache_get_curve(stp_cached_curve_t *cache);
  56.  
  57. extern void stp_curve_cache_curve_invalidate(stp_cached_curve_t *cache);
  58.  
  59. extern void stp_curve_cache_set_curve(stp_cached_curve_t *cache,
  60.                       stp_curve_t *curve);
  61.  
  62. extern void stp_curve_cache_set_curve_copy(stp_cached_curve_t *cache,
  63.                        const stp_curve_t *curve);
  64.  
  65. extern size_t stp_curve_cache_get_count(stp_cached_curve_t *cache);
  66.  
  67. extern const unsigned short *stp_curve_cache_get_ushort_data(stp_cached_curve_t *cache);
  68.  
  69. extern const double *stp_curve_cache_get_double_data(stp_cached_curve_t *cache);
  70.  
  71. extern void stp_curve_cache_copy(stp_cached_curve_t *dest,
  72.                  const stp_cached_curve_t *src);
  73.  
  74. #define CURVE_CACHE_FAST_USHORT(cache) ((cache)->s_cache)
  75. #define CURVE_CACHE_FAST_DOUBLE(cache) ((cache)->d_cache)
  76. #define CURVE_CACHE_FAST_COUNT(cache) ((cache)->count)
  77.  
  78. #ifdef __cplusplus
  79.   }
  80. #endif
  81.  
  82. #endif /* GUTENPRINT_CURVE_CACHE_H */
  83.